#include <iostream>
#include <vector>
#include <stack>
#include <cstdlib>
using namespace std;
int ComputeExpression(const vector<string>&);
int main(){
	vector<string> v={"10","6","9","3","+","-11","*","/","*","17","+","5","+"};
	cout<<ComputeExpression(v)<<endl;
	return 0;
}
int ComputeExpression(const vector<string>& exp){
	stack<int> numStack;
	for(const string& s:exp){
		if(s=="+"||s=="-"||s=="*"||s=="/"){
			int n2=numStack.top();
			numStack.pop();
			int n1=numStack.top();
			numStack.pop();
			if(s=="+") numStack.push(n1+n2);
			else if(s=="-") numStack.push(n1-n2);
			else if(s=="*") numStack.push(n1*n2);
			else if(s=="/") numStack.push(n1/n2);
		} else numStack.push(atoi(s.c_str()));
	}
	return numStack.top();
}
